import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:honeypotflutter/publicBussine/bussine_colors.dart';
import 'package:honeypotflutter/publicBussine/bussine_font.dart';
import 'package:honeypotflutter/publicBussine/bussine_image.dart';
import 'package:honeypotflutter/publicBussine/loginInfo/bussine_userInfo.dart';
import 'package:honeypotflutter/publicBussine/view/bussine_switchMonry.dart';
import 'package:honeypotflutter/public/public_total.dart';
import 'package:honeypotflutter/router/bussine_router_url.dart';

class MineWallCard extends StatelessWidget {
  const MineWallCard({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.only(left: 20, right: 20),
      height: 120,
      decoration: BoxDecoration(
        image: DecorationImage(
            image: AssetImage(MGImage.image(
          "mine_backimages",
          type: ImagePathType.mine,
        ))),
      ),
      child: Row(
        children: [
          GetBuilder<UserInfoLogic>(
              init: UserInfoLogic(),
              builder: (controller) {
                return MGSwitchMonry(
                  monry: controller.userInfo.accountBalance ?? 0.00,
                );
              }),
          InkWell(
            child: Container(
              padding: EdgeInsets.only(left: 15, right: 15, top: 1, bottom: 1),
              decoration: BoxDecoration(
                border: Border.all(color: MGColors.whileColor, width: 1),
                borderRadius: BorderRadius.circular(15),
              ),
              child: Text(
                "去看看",
                style: TextStyle(color: Colors.white, fontSize: MGFont.textFont2, height: 2),
                textAlign: TextAlign.center,
              ),
            ),
            onTap: () {
              Get.toNamed(MGRouterUrl.account_balance);
            },
          )
        ],
        crossAxisAlignment: CrossAxisAlignment.center,
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
      ),
    );
  }
}
